3.8.99 \(\int \frac {(-a-b x)^{-n} (a+b x)^n}{x} \, dx\)

Optimal. Leaf size=22 \[ \log (x) (-a-b x)^{-n} (a+b x)^n \]

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {23, 29} \begin {gather*} \log (x) (-a-b x)^{-n} (a+b x)^n \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x)^n/(x*(-a - b*x)^n),x]

[Out]

((a + b*x)^n*Log[x])/(-a - b*x)^n

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rubi steps

\begin {align*} \int \frac {(-a-b x)^{-n} (a+b x)^n}{x} \, dx &=\left ((-a-b x)^{-n} (a+b x)^n\right ) \int \frac {1}{x} \, dx\\ &=(-a-b x)^{-n} (a+b x)^n \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 22, normalized size = 1.00 \begin {gather*} \log (x) (-a-b x)^{-n} (a+b x)^n \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)^n/(x*(-a - b*x)^n),x]

[Out]

((a + b*x)^n*Log[x])/(-a - b*x)^n

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.05, size = 25, normalized size = 1.14 \begin {gather*} \log (-b x) (-a-b x)^{-n} (a+b x)^n \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(a + b*x)^n/(x*(-a - b*x)^n),x]

[Out]

((a + b*x)^n*Log[-(b*x)])/(-a - b*x)^n

________________________________________________________________________________________

fricas [A]  time = 2.05, size = 7, normalized size = 0.32 \begin {gather*} \cos \left (\pi n\right ) \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n/x/((-b*x-a)^n),x, algorithm="fricas")

[Out]

cos(pi*n)*log(x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {{\left (b x + a\right )}^{n}}{{\left (-b x - a\right )}^{n} x}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n/x/((-b*x-a)^n),x, algorithm="giac")

[Out]

integrate((b*x + a)^n/((-b*x - a)^n*x), x)

________________________________________________________________________________________

maple [C]  time = 0.04, size = 56, normalized size = 2.55 \begin {gather*} \left (b x +a \right )^{n} {\mathrm e}^{-\left (i \pi \mathrm {csgn}\left (i \left (b x +a \right )\right )^{3}-i \pi \mathrm {csgn}\left (i \left (b x +a \right )\right )^{2}+\ln \left (b x +a \right )+i \pi \right ) n} \ln \relax (x ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^n/x/((-b*x-a)^n),x)

[Out]

ln(x)*(b*x+a)^n*exp(-n*(I*Pi*csgn(I*(b*x+a))^3-I*Pi*csgn(I*(b*x+a))^2+I*Pi+ln(b*x+a)))

________________________________________________________________________________________

maxima [A]  time = 0.86, size = 6, normalized size = 0.27 \begin {gather*} \left (-1\right )^{n} \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^n/x/((-b*x-a)^n),x, algorithm="maxima")

[Out]

(-1)^n*log(x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.05 \begin {gather*} \int \frac {{\left (a+b\,x\right )}^n}{x\,{\left (-a-b\,x\right )}^n} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x)^n/(x*(- a - b*x)^n),x)

[Out]

int((a + b*x)^n/(x*(- a - b*x)^n), x)

________________________________________________________________________________________

sympy [C]  time = 6.68, size = 44, normalized size = 2.00 \begin {gather*} \begin {cases} e^{- i \pi n} \log {\left (-1 + \frac {b \left (\frac {a}{b} + x\right )}{a} \right )} & \text {for}\: \left |{\frac {b \left (\frac {a}{b} + x\right )}{a}}\right | > 1 \\e^{- i \pi n} \log {\left (1 - \frac {b \left (\frac {a}{b} + x\right )}{a} \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**n/x/((-b*x-a)**n),x)

[Out]

Piecewise((exp(-I*pi*n)*log(-1 + b*(a/b + x)/a), Abs(b*(a/b + x)/a) > 1), (exp(-I*pi*n)*log(1 - b*(a/b + x)/a)
, True))

________________________________________________________________________________________